-- ================================================
-- Template generated from Template Explorer using:
-- Create Scalar Function (New Menu).SQL
--
-- Use the Specify Values for Template Parameters 
-- command (Ctrl-Shift-M) to fill in the parameter 
-- values below.
--
-- This block of comments will not be included in
-- the definition of the function.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date, ,>
-- Description:	<Description, ,>
-- =============================================
CREATE FUNCTION SUPERACIDOS.PermisoHabilitado
(
	-- Add the parameters for the function here
	@rol INT , @usuario int
)
RETURNS BIT
AS
BEGIN
	-- Declare the return variable here
	IF EXISTS (SELECT 1 FROM SUPERACIDOS.Usuario_Rol WHERE UsRo_RolId = @rol AND UsRo_UsuarioId = @usuario)
		RETURN 1
	
	
	RETURN 0
END
GO

